/**
 * com.monte.dao.impl.InsertCommand.java
 * create by FengMy from 2013
 */
package com.monte.persistence.command;

import com.monte.persistence.CommandContext;
import com.monte.persistence.PersistenceCommand;

/**
 * @描述:插入数据命令
 * @author FengMy
 * @since 2013-3-4
 */
public class InsertEntityCommand implements PersistenceCommand {
	private Object entity;
	public InsertEntityCommand(Object entity){
		this.entity = entity;
	}
	
	@Override
	public Object execute(CommandContext context) {
		context.getEntityManager().persist(entity);
		return entity;
	}
}
